<template>
  <div class="app-container" />
</template>

<script>
import { getCompany } from '@/api/knowledge/company'
import waves from '@/directive/waves' // waves directive
import { } from '@/utils'

export default {
  name: 'ComplexTable',
  components: { },
  directives: { waves },
  filters: {
  },
  data() {
    return {
      tableKey: 0,
      companyForm: {
        code: '',
        title: '',
        remark: '',
        status: {
          label: '',
          value: 1
        }
      },
      companyFormRules: []
    }
  },
  created() {
    let companyId = this.$route.query && this.$route.query.companyId
    if (companyId !== undefined) {
      companyId = parseInt(companyId)
      if (!isNaN(companyId)) {
        this.listLoading = true
        const formData = {
          'companyId': companyId
        }
        getCompany(formData).then(response => {
          if (response.status === 200) {
            this.companyForm = response.data
          } else {
            this.$message({
              message: response.msg,
              type: 'error'
            })
          }
        })
      }
    }
    console.log(companyId)
  },
  methods: {
    handleCannel() {
      this.$router.push({ path: 'company' })
    }
  }
}
</script>
